<!DOCTYPE html>
<html style='width:100%;height:100%;'>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="../libs/theme/default/style.css" type="text/css">
	<script src="../libs/jquery-1.3.2.min.js" type="text/javascript"></script>    
    <script src="../libs/OpenLayers.js"></script>

	
	<script src="../js/gis.js"></script>
  </head>
  <body style='width:100%;height:100%;padding: 0px;margin: 0px;border: 0px;'>
  <div id="map" style='width:100%;height:100%;'></div>
  </body>
<script type="text/javascript">
var map = new OpenLayers.Map( 'map', {maxResolution:1.40625/2} );	

var baseLayer = new OpenLayers.Layer.TMS("baseLayer"," ",{
	layername:"EDS",type:"png",
	getURL: function (bounds) {
		bounds = this.adjustBounds(bounds);
		var res = this.map.getResolution();
		var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
		var y = Math.round((bounds.top + this.tileOrigin.lat) / (res * this.tileSize.h));
		var z = this.serverResolutions != null ?
		OpenLayers.Util.indexOf(this.serverResolutions, res) :
		this.map.getZoom() + this.zoomOffset;
		var shift = z / 2;
		var half = 2 << shift;
		 
		var digits = 1;
		if (half > 10) {
			digits = Math.ceil(  Math.floor(Math.log(half)/Math.log(10)) + 1 );
		}
		var halfx = Math.floor( x / half );
		var halfy = Math.floor( y / half );

		var path = "http://hbpic0.go2map.com/seamless1/dalian/mappic/png"+(7-z)+"/"+x+","+y*(-1)+".jpg";
		//var path = "../jsp/myapp.jsp?class=service_resource&function=eds_map&path="+(7-z)+"/"+x+","+y*(-1)+".jpg";
		//var path = "../file/gis/"+(7-z)+"/"+x+","+y*(-1)+".jpg";
		
		return  path;
	}},
	{ tileSize: new OpenLayers.Size(256,256) }
);
				
map.addLayer(baseLayer);
</script>  
</html>